<template>
  <div id="i_cecream">
    <div style=" padding-top: 10px;">
      <lunbo />
    </div>
    
    <div class="bili-header large-header">
      <div class="bili-header__channel" data-v-e19dabc8>
        <centerLeft />
        <div class="relative-container" data-v-e19dabc8>
          <div class="right-channel-container" data-v-e19dabc8>
            <center />
            <centerRight />
          </div>
        </div>
      </div>
    </div>

    <main>
      <div class="bili-video-card is-rcmd" data-report="tianma.1-1-1.click" data-v-f51aa350>
        <ul class="list" v-infinite-scroll="load" infinite-scroll-disabled="disabled">
          <li v-for="i in videoList" :key="i.videoId" class="list-item" style="float:left">
            <videoevery :video="i" />
          </li>
        </ul>

        <div style="float:left">
          <p v-if="loading" style="float:bottom">加载中...</p>
          <p v-if="noMore" style="float:bottom">没有更多了</p>
        </div>
      </div>
    </main>
  </div>
</template>

<script>
import videoevery from "@/views/index/video";
import lunbo from "@/views/index/lunbo";
import centerLeft from "@/views/index/centerLeft";
import center from "@/views/index/center";
import centerRight from "@/views/index/centerRight";
export default {
  name: "bindex",
  data() {
    return {
      videoList: [
        {
          videoId: "172518101811",
          uploadId: "1725180404027228160",
          videoPath:
            "s47vagiob.hn-bkt.clouddn.com/video/20231116/808afd0aba2b41cab4c9ea2b6550fc30.mp4",
          videoType: "video/mp4",
          videoLongth: "0:0:15",
          videoTitle: "我是测试2号",
          videoIntroduct: "测试2号就是我啦",
          videoLike: "0",
          videoCollects: "0",
          videoComments: "0",
          videoForward: "0",
          videoPlayTimes: "1",
          upId: "1711410731683020800",
          videoPartitionIds:
            "1712492900841029632,1722296156131819520,1722291580943073280,1712493442782855168",
          videoPartition: "国创、娱乐、科研、数码、",
          isAllow: "Y",
          videoCover:
            "s47vagiob.hn-bkt.clouddn.com/img/20231116/4dc75ef5b68d46fbb145e86443cef84d.jpg",
          videoCoverId: "1725179348841005056",
          isOriginal: "Y",
          createId: "1711410731683020800",
          createCode: "56292976232",
          createName: "bprogram",
          createTime: "2023-11-16T23:56:34",
          updateId: null,
          updateCode: null,
          updateName: null,
          updateTime: "2023-12-18T17:13:25"
        },
        {
          videoId: "2",
          uploadId: "1725180404027228160",
          videoPath:
            "s47vagiob.hn-bkt.clouddn.com/video/20231116/808afd0aba2b41cab4c9ea2b6550fc30.mp4",
          videoType: "video/mp4",
          videoLongth: "0:0:15",
          videoTitle: "我是测试2号",
          videoIntroduct: "测试2号就是我啦",
          videoLike: "0",
          videoCollects: "0",
          videoComments: "0",
          videoForward: "0",
          videoPlayTimes: "1",
          upId: "1711410731683020800",
          videoPartitionIds:
            "1712492900841029632,1722296156131819520,1722291580943073280,1712493442782855168",
          videoPartition: "国创、娱乐、科研、数码、",
          isAllow: "Y",
          videoCover:
            "s47vagiob.hn-bkt.clouddn.com/img/20231116/4dc75ef5b68d46fbb145e86443cef84d.jpg",
          videoCoverId: "1725179348841005056",
          isOriginal: "Y",
          createId: "1711410731683020800",
          createCode: "56292976232",
          createName: "bprogram",
          createTime: "2023-11-16T23:56:34",
          updateId: null,
          updateCode: null,
          updateName: null,
          updateTime: "2023-12-18T17:13:25"
        },
        {
          videoId: "172518101813",
          uploadId: "1725180404027228160",
          videoPath:
            "s47vagiob.hn-bkt.clouddn.com/video/20231116/808afd0aba2b41cab4c9ea2b6550fc30.mp4",
          videoType: "video/mp4",
          videoLongth: "0:0:15",
          videoTitle: "我是测试2号",
          videoIntroduct: "测试2号就是我啦",
          videoLike: "0",
          videoCollects: "0",
          videoComments: "0",
          videoForward: "0",
          videoPlayTimes: "1",
          upId: "1711410731683020800",
          videoPartitionIds:
            "1712492900841029632,1722296156131819520,1722291580943073280,1712493442782855168",
          videoPartition: "国创、娱乐、科研、数码、",
          isAllow: "Y",
          videoCover:
            "s47vagiob.hn-bkt.clouddn.com/img/20231116/4dc75ef5b68d46fbb145e86443cef84d.jpg",
          videoCoverId: "1725179348841005056",
          isOriginal: "Y",
          createId: "1711410731683020800",
          createCode: "56292976232",
          createName: "bprogram",
          createTime: "2023-11-16T23:56:34",
          updateId: null,
          updateCode: null,
          updateName: null,
          updateTime: "2023-12-18T17:13:25"
        },
        {
          videoId: "444",
          uploadId: "1725180404027228160",
          videoPath:
            "s47vagiob.hn-bkt.clouddn.com/video/20231116/808afd0aba2b41cab4c9ea2b6550fc30.mp4",
          videoType: "video/mp4",
          videoLongth: "0:0:15",
          videoTitle: "我是测试2号",
          videoIntroduct: "测试2号就是我啦",
          videoLike: "0",
          videoCollects: "0",
          videoComments: "0",
          videoForward: "0",
          videoPlayTimes: "1",
          upId: "1711410731683020800",
          videoPartitionIds:
            "1712492900841029632,1722296156131819520,1722291580943073280,1712493442782855168",
          videoPartition: "国创、娱乐、科研、数码、",
          isAllow: "Y",
          videoCover:
            "s47vagiob.hn-bkt.clouddn.com/img/20231116/4dc75ef5b68d46fbb145e86443cef84d.jpg",
          videoCoverId: "1725179348841005056",
          isOriginal: "Y",
          createId: "1711410731683020800",
          createCode: "56292976232",
          createName: "bprogram",
          createTime: "2023-11-16T23:56:34",
          updateId: null,
          updateCode: null,
          updateName: null,
          updateTime: "2023-12-18T17:13:25"
        },
        {
          videoId: "172518101815",
          uploadId: "1725180404027228160",
          videoPath:
            "s47vagiob.hn-bkt.clouddn.com/video/20231116/808afd0aba2b41cab4c9ea2b6550fc30.mp4",
          videoType: "video/mp4",
          videoLongth: "0:0:15",
          videoTitle: "我是测试2号",
          videoIntroduct: "测试2号就是我啦",
          videoLike: "0",
          videoCollects: "0",
          videoComments: "0",
          videoForward: "0",
          videoPlayTimes: "1",
          upId: "1711410731683020800",
          videoPartitionIds:
            "1712492900841029632,1722296156131819520,1722291580943073280,1712493442782855168",
          videoPartition: "国创、娱乐、科研、数码、",
          isAllow: "Y",
          videoCover:
            "s47vagiob.hn-bkt.clouddn.com/img/20231116/4dc75ef5b68d46fbb145e86443cef84d.jpg",
          videoCoverId: "1725179348841005056",
          isOriginal: "Y",
          createId: "1711410731683020800",
          createCode: "56292976232",
          createName: "bprogram",
          createTime: "2023-11-16T23:56:34",
          updateId: null,
          updateCode: null,
          updateName: null,
          updateTime: "2023-12-18T17:13:25"
        }
      ],
      count: 2, //设置初始的加载个数
      loading: false
    };
  },
  computed: {
    noMore() {
      return this.count >= this.videoList.length;
    },
    disabled() {
      return this.loading || this.noMore;
    }
  },
  components: {
    centerLeft,
    lunbo,
    center,
    centerRight,
    videoevery
  },
  created() {
    this.getVideoList();
  },
  methods: {
  

    load() {
      this.loading = true;
      setTimeout(() => {
        this.count += 12;
        this.loading = false;
      }, 2000);
    },
    getVideoList() {
      this.axios({
        method: "get",
        params: {
          currentPage: 1,
          pageSize: 1000,
          partId: ""
        },
        url: "http://localhost:8094/video/getPageVideo"
      })
        .then(res => {
          this.videoList = res.data.records;
          console.log("this.videoList", this.videoList);
        })
        .catch(e => {
          this.$message.error(e.response.data.message);
        });
    }
  }
};
</script>
<style   scoped>
@import "https://s1.hdslb.com/bfs/static/jinkela/long/laputa-css/map.css";
@import "//s1.hdslb.com/bfs/static/jinkela/long/laputa-css/light.css";
@import "//s1.hdslb.com/bfs/static/laputa-home/client/assets/index.a07a9422.css";

.list-item {
  padding: 8px;
}
.list {
  width: 1349px;
  padding-left: 58px;
  padding-top: 20px;
}
</style>


